import 'package:backend.core/core/domain/entities/api/api_money_amount.dart';
import 'package:backend.core/core/domain/entities/web/web_money_amount.dart';

abstract class CreateApiMoneyAmountFromInternalOne {
  ApiMoneyAmount call({
    required WebMoneyAmount moneyAmount,
  });
}

class CreateApiMoneyAmountFromInternalOneImpl implements CreateApiMoneyAmountFromInternalOne {
  const CreateApiMoneyAmountFromInternalOneImpl();

  @override
  ApiMoneyAmount call({
    required WebMoneyAmount moneyAmount,
  }) {
    return ApiMoneyAmount(
      value: moneyAmount.value,
      currency: moneyAmount.currency,
    );
  }
}
